-
Notifications
You must be signed in to change notification settings - Fork 13
More integration tests #173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
CLA Assistant Lite bot All contributors have signed the CLA ✍️ |
(f"{DEPARTING_EMPLOYEE_COMMAND} bulk remove", "Missing argument 'FILE'."), | ||
], | ||
) | ||
def test_departing_employee_command_returns_error_exit_status_when_missing_required_parameters( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These negative tests should fall under unit tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I agree. Should we move them to their respective unit test modules? There might some tests of this similar nature dispersed already, but I know there is not a ton
cd1e1e3
to
4bc85e7
Compare
integration/test_alert_rules.py
Outdated
@pytest.mark.parametrize( | ||
"command", | ||
[ | ||
f"{ALERT_RULES_COMMAND} list", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
string.format
is more consistent with how we format strings in py42
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed.
These look good! I have the same thought as you - that the negatives tests are more like integration tests when they verify args are present. I think they are good tests to have. Just recently, we had a big where deleting profile name arg was no required, these tests would have caught that earlier. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good for now, but some of the same improvements for py42 integration tests apply here (make able to run via pytest)
e77fcec
to
f92661c
Compare
Changed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Were you still going to remove/move those negative tests that should be covered by unit tests?
We will keep those tests and I have added the |
Added trivial integration test cases, those that do not need any pre-test setup or cleanup.